import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.net.connection.d.ts',
  content: "/*\n * Copyright (C) 2022-2023 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit NetworkKit\n */\nimport type { AsyncCallback, Callback } from './@ohos.base';\nimport type http from './@ohos.net.http';\nimport type socket from './@ohos.net.socket';\n/**\n * Provides interfaces to manage and use data networks.\n * @namespace connection\n * @syscap SystemCapability.Communication.NetManager.Core\n * @since 8\n */\n/**\n * Provides interfaces to manage and use data networks.\n * @namespace connection\n * @syscap SystemCapability.Communication.NetManager.Core\n * @crossplatform\n * @since 10\n */\n/**\n * Provides interfaces to manage and use data networks.\n * @namespace connection\n * @syscap SystemCapability.Communication.NetManager.Core\n * @crossplatform\n * @atomicservice\n * @since 11\n */\ndeclare namespace connection {\n    /**\n     * Get an HTTP request task.\n     * @syscap SystemCapability.Communication.NetStack\n     * @since 8\n     */\n    /**\n     * Get an HTTP request task.\n     * @syscap SystemCapability.Communication.NetStack\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Get an HTTP request task.\n     * @typedef { http.HttpRequest }\n     * @syscap SystemCapability.Communication.NetStack\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    type HttpRequest = http.HttpRequest;\n    /**\n     * Get a TCPSocket object.\n     * @syscap SystemCapability.Communication.NetStack\n     * @since 8\n     */\n    /**\n     * Get a TCPSocket object.\n     * @typedef { socket.TCPSocket }\n     * @syscap SystemCapability.Communication.NetStack\n     * @crossplatform\n     * @since 10\n     */\n    type TCPSocket = socket.TCPSocket;\n    /**\n     * Get a UDPSocket object.\n     * @syscap SystemCapability.Communication.NetStack\n     * @since 8\n     */\n    /**\n     * Get a UDPSocket object.\n     * @typedef { socket.UDPSocket }\n     * @syscap SystemCapability.Communication.NetStack\n     * @crossplatform\n     * @since 10\n     */\n    type UDPSocket = socket.UDPSocket;\n    /**\n     * Create a network connection with optional netSpecifier and timeout.\n     * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}.\n     * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before\n     * {@link NetConnection#netUnavailable} is called.\n     * @returns { NetConnection } the NetConnection of the NetSpecifier.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Create a network connection with optional netSpecifier and timeout.\n     * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}.\n     * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before\n     * {@link NetConnection#netUnavailable} is called.\n     * @returns { NetConnection } the NetConnection of the NetSpecifier.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Create a network connection with optional netSpecifier and timeout.\n     * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}.\n     * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before\n     * {@link NetConnection#netUnavailable} is called.\n     * @returns { NetConnection } the NetConnection of the NetSpecifier.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function createNetConnection(netSpecifier?: NetSpecifier, timeout?: number): NetConnection;\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<NetHandle> } callback - the callback of getDefaultNet.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<NetHandle> } callback - the callback of getDefaultNet.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getDefaultNet(callback: AsyncCallback<NetHandle>): void;\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<NetHandle> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<NetHandle> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getDefaultNet(): Promise<NetHandle>;\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { NetHandle } if the default network is not activated.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    /**\n     * Obtains the data network that is activated by default.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { NetHandle } if the default network is not activated.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getDefaultNetSync(): NetHandle;\n    /**\n     * Obtains the list of data networks that are activated.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<Array<NetHandle>> } callback - the callback of getAllNets.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getAllNets(callback: AsyncCallback<Array<NetHandle>>): void;\n    /**\n     * Obtains the list of data networks that are activated.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<Array<NetHandle>> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getAllNets(): Promise<Array<NetHandle>>;\n    /**\n     * Obtains the list of data networks that are activated.\n     * To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Array<NetHandle> } Returns data networks that are activated.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function getAllNetsSync(): Array<NetHandle>;\n    /**\n     * Queries the connection properties of a network.\n     * This method requires the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the network to be queried.\n     * @param { AsyncCallback<ConnectionProperties> } callback - the callback of getConnectionProperties.{@link ConnectionProperties}.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback<ConnectionProperties>): void;\n    /**\n     * Queries the connection properties of a network.\n     * This method requires the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the network to be queried.\n     * @returns { Promise<ConnectionProperties> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getConnectionProperties(netHandle: NetHandle): Promise<ConnectionProperties>;\n    /**\n     * Queries the connection properties of a network.\n     * This method requires the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the network to be queried.\n     * @returns { ConnectionProperties } Returns the connection properties of a network.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function getConnectionPropertiesSync(netHandle: NetHandle): ConnectionProperties;\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @param { AsyncCallback<NetCapabilities> } callback - the callback of getNetCapabilities.{@link NetCapabilities}.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @param { AsyncCallback<NetCapabilities> } callback - the callback of getNetCapabilities.{@link NetCapabilities}.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback<NetCapabilities>): void;\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @returns { Promise<NetCapabilities> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @returns { Promise<NetCapabilities> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getNetCapabilities(netHandle: NetHandle): Promise<NetCapabilities>;\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @returns { NetCapabilities } Returns the connection capabilities of a network.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    /**\n     * Obtains {@link NetCapabilities} of a {@link NetHandle} object.\n     * To invoke this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { NetHandle } netHandle - Indicates the handle. See {@link NetHandle}.\n     * @returns { NetCapabilities } Returns the connection capabilities of a network.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    function getNetCapabilitiesSync(netHandle: NetHandle): NetCapabilities;\n    /**\n     * Checks whether data traffic usage on the current network is metered.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if data traffic usage on the current network is metered;\n     * returns {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function isDefaultNetMetered(callback: AsyncCallback<boolean>): void;\n    /**\n     * Checks whether data traffic usage on the current network is metered.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function isDefaultNetMetered(): Promise<boolean>;\n    /**\n     * Checks whether data traffic usage on the current network is metered.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { boolean } Returns true if the current network is metered, else returns false.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function isDefaultNetMeteredSync(): boolean;\n    /**\n     * Checks whether the default data network is activated.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if the default data network is activated;\n     * returns {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Checks whether the default data network is activated.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @param { AsyncCallback<boolean> } callback - Returns {@code true} if the default data network is activated;\n     * returns {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    function hasDefaultNet(callback: AsyncCallback<boolean>): void;\n    /**\n     * Checks whether the default data network is activated.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<boolean> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Checks whether the default data network is activated.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { Promise<boolean> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    function hasDefaultNet(): Promise<boolean>;\n    /**\n     * Checks whether the default data network is activated.\n     * @permission ohos.permission.GET_NETWORK_INFO\n     * @returns { boolean } Returns true if the default data network is activated, else returns false.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function hasDefaultNetSync(): boolean;\n    /**\n     * Reports the network state is connected.\n     * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the network whose state is to be reported.\n     * @param { AsyncCallback<void> } callback - the callback of reportNetConnected.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function reportNetConnected(netHandle: NetHandle, callback: AsyncCallback<void>): void;\n    /**\n     * Reports the network state is connected.\n     * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the network whose state is to be reported.\n     * @returns { Promise<void> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function reportNetConnected(netHandle: NetHandle): Promise<void>;\n    /**\n     * Reports the network state is disconnected.\n     * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the network whose state is to be reported.\n     * @param { AsyncCallback<void> } callback - the callback of reportNetDisconnected.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function reportNetDisconnected(netHandle: NetHandle, callback: AsyncCallback<void>): void;\n    /**\n     * Reports the network state is disconnected.\n     * @permission ohos.permission.GET_NETWORK_INFO and ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the network whose state is to be reported.\n     * @returns { Promise<void> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function reportNetDisconnected(netHandle: NetHandle): Promise<void>;\n    /**\n     * Resolves the host name to obtain all IP addresses based on the default data network.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { AsyncCallback<Array<NetAddress>> } callback - Returns the NetAddress list.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getAddressesByName(host: string, callback: AsyncCallback<Array<NetAddress>>): void;\n    /**\n     * Resolves the host name to obtain all IP addresses based on the default data network.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @returns { Promise<Array<NetAddress>> } The promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    function getAddressesByName(host: string): Promise<Array<NetAddress>>;\n    /**\n     * Obtains the {@link NetHandle} bound to a process using {@link setAppNet}.\n     * @param { AsyncCallback<NetHandle> } callback - Returns the {@link NetHandle} bound to the process;\n     * returns {@code null} if no {@link NetHandle} is bound to the process.For details, see {@link NetHandle}.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function getAppNet(callback: AsyncCallback<NetHandle>): void;\n    /**\n     * Obtains the {@link NetHandle} bound to a process using {@link setAppNet}.\n     * @returns { Promise<NetHandle> } the promise returned by the function.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function getAppNet(): Promise<NetHandle>;\n    /**\n     * Obtains the {@link NetHandle} bound to a process using {@link setAppNet}.\n     * @returns { NetHandle } Returns the {@link NetHandle} bound to a process using {@link setAppNet}.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function getAppNetSync(): NetHandle;\n    /**\n     * Binds a process to {@code NetHandle}.\n     * <p>All the sockets created from the process will be bound to the {@code NetHandle},\n     * and the resolution of all host names will be managed by the {@code NetHandle}.</p>\n     * @permission ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the handle. For details, see {@link NetHandle}.\n     * @param { AsyncCallback<void> } callback - the callback of setAppNet.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function setAppNet(netHandle: NetHandle, callback: AsyncCallback<void>): void;\n    /**\n     * Binds a process to {@code NetHandle}.\n     * <p>All the sockets created from the process will be bound to the {@code NetHandle},\n     * and the resolution of all host names will be managed by the {@code NetHandle}.</p>\n     * @permission ohos.permission.INTERNET\n     * @param { NetHandle } netHandle - Indicates the handle. For details, see {@link NetHandle}.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 9\n     */\n    function setAppNet(netHandle: NetHandle): Promise<void>;\n    /**\n     * Obtains the default {@link HttpProxy} proxy settings.\n     *\n     * If an application level proxy is set, the application level proxy parameters are returned.\n     * If a global proxy is set, the global proxy parameters are returned.\n     * If the process is bound to a {@link NetHandle} using {@link setAppNet}, the {@link NetHandle} proxy settings are returned.\n     * In other cases, the proxy settings of default network are returned.\n     *\n     * @param { AsyncCallback<HttpProxy> } callback - Returns the default {@link HttpProxy} settings.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function getDefaultHttpProxy(callback: AsyncCallback<HttpProxy>): void;\n    /**\n     * Obtains the default {@link HttpProxy} proxy settings.\n     *\n     * If an application level proxy is set, the application level proxy parameters are returned.\n     * If a global proxy is set, the global proxy parameters are returned.\n     * If the process is bound to a {@link NetHandle} using {@link setAppNet}, the {@link NetHandle} proxy settings are returned.\n     * In other cases, the proxy settings of default network are returned.\n     *\n     * @returns { Promise<HttpProxy> } the promise returned by the function.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    function getDefaultHttpProxy(): Promise<HttpProxy>;\n    /**\n     * Set application level http proxy {@link HttpProxy}.\n     * @param { HttpProxy } httpProxy - Indicates the application level proxy settings. For details, see {@link HttpProxy}.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid http proxy.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    function setAppHttpProxy(httpProxy: HttpProxy): void;\n    /**\n     * Set the URL {@link pacUrl} of the current PAC script.\n     * To invoke this method, you must have the {@code ohos.permission.SET_PAC_URL} permission.\n     * @permission ohos.permission.SET_PAC_URL\n     * @param { string } pacUrl - Indicates the URL of the current PAC script.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 15\n     */\n    function setPacUrl(pacUrl: string): void;\n    /**\n     * Obtain the URL {@link pacUrl} of the current PAC script.\n     * @returns { string } Returns the URL of the current PAC script or empty string if there is no PAC script.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 15\n     */\n    function getPacUrl(): string;\n    /**\n     * Add a custom {@link host} and corresponding {@link ip} mapping for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { Array<string> } ip - List of IP addresses mapped to the host name.\n     * @param { AsyncCallback<void> } callback - Returns the callback of addCustomDnsRule.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    /**\n     * Add a custom {@link host} and corresponding {@link ip} mapping for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { Array<string> } ip - List of IP addresses mapped to the host name.\n     * @param { AsyncCallback<void> } callback - Returns the callback of addCustomDnsRule.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 15\n     */\n    function addCustomDnsRule(host: string, ip: Array<string>, callback: AsyncCallback<void>): void;\n    /**\n     * Add a custom {@link host} and corresponding {@link ip} mapping for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { Array<string> } ip - List of IP addresses mapped to the host name.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    /**\n     * Add a custom {@link host} and corresponding {@link ip} mapping for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { Array<string> } ip - List of IP addresses mapped to the host name.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 15\n     */\n    function addCustomDnsRule(host: string, ip: Array<string>): Promise<void>;\n    /**\n     * Remove the custom DNS rule of the {@link host} for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { AsyncCallback<void> } callback - Returns the callback of removeCustomDnsRule.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    /**\n     * Remove the custom DNS rule of the {@link host} for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @param { AsyncCallback<void> } callback - Returns the callback of removeCustomDnsRule.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 15\n     */\n    function removeCustomDnsRule(host: string, callback: AsyncCallback<void>): void;\n    /**\n     * Remove the custom DNS rule of the {@link host} for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    /**\n     * Remove the custom DNS rule of the {@link host} for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { string } host - Indicates the host name or the domain.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 15\n     */\n    function removeCustomDnsRule(host: string): Promise<void>;\n    /**\n     * Clear all custom DNS rules for current application.\n     * @permission ohos.permission.INTERNET\n     * @param { AsyncCallback<void> } callback - Returns the callback of clearCustomDnsRules.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    function clearCustomDnsRules(callback: AsyncCallback<void>): void;\n    /**\n     * Clear all custom DNS rules for current application.\n     * @permission ohos.permission.INTERNET\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2100001 - Invalid parameter value.\n     * @throws { BusinessError } 2100002 - Failed to connect to the service.\n     * @throws { BusinessError } 2100003 - System internal error.\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    function clearCustomDnsRules(): Promise<void>;\n    /**\n     * Represents the network connection handle.\n     * @interface NetConnection\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Represents the network connection handle.\n     * @interface NetConnection\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Represents the network connection handle.\n     * @interface NetConnection\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    export interface NetConnection {\n        /**\n         * Registers a listener for netAvailable events.\n         * @param { 'netAvailable' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for netAvailable events.\n         * @param { 'netAvailable' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Registers a listener for netAvailable events.\n         * @param { 'netAvailable' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'netAvailable', callback: Callback<NetHandle>): void;\n        /**\n         * Registers a listener for netBlockStatusChange events.\n         * @param { 'netBlockStatusChange' } type - Indicates Event name.\n         * @param { Callback<{ netHandle: NetHandle, blocked: boolean }> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for netBlockStatusChange events.\n         * @param { 'netBlockStatusChange' } type - Indicates Event name.\n         * @param { Callback<NetBlockStatusInfo> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        on(type: 'netBlockStatusChange', callback: Callback<NetBlockStatusInfo>): void;\n        /**\n         * Registers a listener for **netCapabilitiesChange** events.\n         * @param { 'netCapabilitiesChange' } type - Indicates Event name.\n         * @param { Callback<NetCapabilityInfo> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for **netCapabilitiesChange** events.\n         * @param { 'netCapabilitiesChange' } type - Indicates Event name.\n         * @param { Callback<NetCapabilityInfo> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Registers a listener for **netCapabilitiesChange** events.\n         * @param { 'netCapabilitiesChange' } type - Indicates Event name.\n         * @param { Callback<NetCapabilityInfo> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'netCapabilitiesChange', callback: Callback<NetCapabilityInfo>): void;\n        /**\n         * Registers a listener for netConnectionPropertiesChange events.\n         * @param { 'netConnectionPropertiesChange' } type - Indicates Event name.\n         * @param { Callback<{ netHandle: NetHandle, connectionProperties: ConnectionProperties }> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for netConnectionPropertiesChange events.\n         * @param { 'netConnectionPropertiesChange' } type - Indicates Event name.\n         * @param { Callback<NetConnectionPropertyInfo> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        on(type: 'netConnectionPropertiesChange', callback: Callback<NetConnectionPropertyInfo>): void;\n        /**\n         * Registers a listener for **netLost** events.\n         * @param { 'netLost' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for **netLost** events.\n         * @param { 'netLost' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Registers a listener for **netLost** events.\n         * @param { 'netLost' } type - Indicates Event name.\n         * @param { Callback<NetHandle> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'netLost', callback: Callback<NetHandle>): void;\n        /**\n         * Registers a listener for netUnavailable events.\n         * @param { 'netUnavailable' } type - Indicates Event name.\n         * @param { Callback<void> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Registers a listener for netUnavailable events.\n         * @param { 'netUnavailable' } type - Indicates Event name.\n         * @param { Callback<void> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Registers a listener for netUnavailable events.\n         * @param { 'netUnavailable' } type - Indicates Event name.\n         * @param { Callback<void> } callback - the callback used to return the result.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        on(type: 'netUnavailable', callback: Callback<void>): void;\n        /**\n         * Receives status change notifications of a specified network.\n         * @permission ohos.permission.GET_NETWORK_INFO\n         * @param { AsyncCallback<void> } callback - the callback of register.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101008 - The callback already exists.\n         * @throws { BusinessError } 2101022 - The number of requests exceeded the maximum allowed.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Receives status change notifications of a specified network.\n         * @permission ohos.permission.GET_NETWORK_INFO\n         * @param { AsyncCallback<void> } callback - the callback of register.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101008 - The callback already exists.\n         * @throws { BusinessError } 2101022 - The number of requests exceeded the maximum allowed.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Receives status change notifications of a specified network.\n         * @permission ohos.permission.GET_NETWORK_INFO\n         * @param { AsyncCallback<void> } callback - the callback of register.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101008 - The callback already exists.\n         * @throws { BusinessError } 2101022 - The number of requests exceeded the maximum allowed.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        register(callback: AsyncCallback<void>): void;\n        /**\n         * Cancels listening for network status changes.\n         * @param { AsyncCallback<void> } callback - the callback of unregister.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101007 - The callback does not exist.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Cancels listening for network status changes.\n         * @param { AsyncCallback<void> } callback - the callback of unregister.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101007 - The callback does not exist.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Cancels listening for network status changes.\n         * @param { AsyncCallback<void> } callback - the callback of unregister.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101007 - The callback does not exist.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Cancels listening for network status changes.\n         * @param { AsyncCallback<void> } callback - the callback of unregister.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @throws { BusinessError } 2101007 - The callback does not exist.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        unregister(callback: AsyncCallback<void>): void;\n    }\n    /**\n     * Provides an instance that bear data network capabilities.\n     * @interface NetSpecifier\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Provides an instance that bear data network capabilities.\n     * @interface NetSpecifier\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface NetSpecifier {\n        /**\n         * The transmission capacity and support of the network's global proxy storage data network.\n         * @type {NetCapabilities}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * The transmission capacity and support of the network's global proxy storage data network.\n         * @type {NetCapabilities}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        netCapabilities: NetCapabilities;\n        /**\n         * Network identifier, the identifier for Wi Fi networks is \"wifi\", and the identifier for cellular networks is \"simId1\" (corresponding to SIM card 1).\n         * @type {?string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Network identifier, the identifier for Wi Fi networks is \"wifi\", and the identifier for cellular networks is \"simId1\" (corresponding to SIM card 1).\n         * @type {?string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        bearerPrivateIdentifier?: string;\n    }\n    /**\n     * Receive information about changes in network capabilities.\n     * @interface NetCapabilityInfo\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Receive information about changes in network capabilities.\n     * @interface NetCapabilityInfo\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    export interface NetCapabilityInfo {\n        /**\n         * Defines the handle of the data network.\n         * @type { NetHandle }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Defines the handle of the data network.\n         * @type { NetHandle }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        netHandle: NetHandle;\n        /**\n         * Defines the network capability set.\n         * @type { NetCapabilities }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Defines the network capability set.\n         * @type { NetCapabilities }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        netCap: NetCapabilities;\n    }\n    /**\n     * Defines the handle of the data network.\n     * @interface NetHandle\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Defines the handle of the data network.\n     * @interface NetHandle\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Defines the handle of the data network.\n     * @interface NetHandle\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    export interface NetHandle {\n        /**\n         * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        netId: number;\n        /**\n         * <p>Binds a TCPSocket or UDPSocket to the current network. All data flows from\n         * the socket will use this network, without being subject to {@link setAppNet}.</p>\n         * Before using this method, ensure that the socket is disconnected.\n         * @param { TCPSocket | UDPSocket } socketParam - Indicates the TCPSocket or UDPSocket object.\n         * @param { AsyncCallback<void> } callback - the callback of bindSocket.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 9\n         */\n        bindSocket(socketParam: TCPSocket | UDPSocket, callback: AsyncCallback<void>): void;\n        /**\n         * <p>Binds a TCPSocket or UDPSocket to the current network. All data flows from\n         * the socket will use this network, without being subject to {@link setAppNet}.</p>\n         * Before using this method, ensure that the socket is disconnected.\n         * @param { TCPSocket | UDPSocket } socketParam - Indicates the TCPSocket or UDPSocket object.\n         * @returns { Promise<void> } the promise returned by the function.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 9\n         */\n        bindSocket(socketParam: TCPSocket | UDPSocket): Promise<void>;\n        /**\n         * Resolves a host name to obtain all IP addresses based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @param { AsyncCallback<Array<NetAddress>> } callback - the callback of getAddressesByName.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Resolves a host name to obtain all IP addresses based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @param { AsyncCallback<Array<NetAddress>> } callback - the callback of getAddressesByName.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 15\n         */\n        getAddressesByName(host: string, callback: AsyncCallback<Array<NetAddress>>): void;\n        /**\n         * Resolves a host name to obtain all IP addresses based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @returns { Promise<Array<NetAddress>> } The promise returned by the function.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Resolves a host name to obtain all IP addresses based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @returns { Promise<Array<NetAddress>> } The promise returned by the function.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 15\n         */\n        getAddressesByName(host: string): Promise<Array<NetAddress>>;\n        /**\n         * Resolves a host name to obtain the first IP address based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @param { AsyncCallback<NetAddress> } callback - the callback of getAddressByName.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        getAddressByName(host: string, callback: AsyncCallback<NetAddress>): void;\n        /**\n         * Resolves a host name to obtain the first IP address based on the specified NetHandle.\n         * @permission ohos.permission.INTERNET\n         * @param { string } host - Indicates the host name or the domain.\n         * @returns { Promise<NetAddress> } The promise returned by the function.\n         * @throws { BusinessError } 201 - Permission denied.\n         * @throws { BusinessError } 401 - Parameter error.\n         * @throws { BusinessError } 2100001 - Invalid parameter value.\n         * @throws { BusinessError } 2100002 - Failed to connect to the service.\n         * @throws { BusinessError } 2100003 - System internal error.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        getAddressByName(host: string): Promise<NetAddress>;\n    }\n    /**\n     * Defines the network capability set.\n     * @interface NetCapabilities\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Defines the network capability set.\n     * @interface NetCapabilities\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Defines the network capability set.\n     * @interface NetCapabilities\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    export interface NetCapabilities {\n        /**\n         * Uplink (device-to-network) bandwidth.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        linkUpBandwidthKbps?: number;\n        /**\n         * Downstream (network-to-device) bandwidth.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        linkDownBandwidthKbps?: number;\n        /**\n         * Network-specific capabilities.\n         * @type {?Array<NetCap>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Network-specific capabilities.\n         * @type {?Array<NetCap>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        networkCap?: Array<NetCap>;\n        /**\n         * Network type.\n         * @type {Array<NetBearType>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Network type.\n         * @type {Array<NetBearType>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Network type.\n         * @type {Array<NetBearType>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        bearerTypes: Array<NetBearType>;\n    }\n    /**\n     * Get information about network connections.\n     * @interface NetConnectionPropertyInfo\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    export interface NetConnectionPropertyInfo {\n        /**\n         * Defines the handle of the data network.\n         * @type { NetHandle }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        netHandle: NetHandle;\n        /**\n         * Defines the network connection properties.\n         * @type { ConnectionProperties }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        connectionProperties: ConnectionProperties;\n    }\n    /**\n     * Get network status information.\n     * @interface NetBlockStatusInfo\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 11\n     */\n    export interface NetBlockStatusInfo {\n        /**\n         * Defines the handle of the data network.\n         * @type { NetHandle }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        netHandle: NetHandle;\n        /**\n         * Check whether the current state is blocked.\n         * @type { boolean }\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 11\n         */\n        blocked: boolean;\n    }\n    /**\n     * Defines the network capability.\n     * @enum {number}\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Defines the network capability.\n     * @enum {number}\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum NetCap {\n        /**\n         * Indicates that the network can access the carrier's MMSC to send and receive multimedia messages.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network can access the carrier's MMSC to send and receive multimedia messages.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        NET_CAPABILITY_MMS = 0,\n        /**\n         * Indicates that the network traffic is not metered.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network traffic is not metered.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        NET_CAPABILITY_NOT_METERED = 11,\n        /**\n         * Indicates that the network can access the Internet.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network can access the Internet.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        NET_CAPABILITY_INTERNET = 12,\n        /**\n         * Indicates that the network does not use a VPN.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network does not use a VPN.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        NET_CAPABILITY_NOT_VPN = 15,\n        /**\n         * Indicates that the network is available.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network is available.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        NET_CAPABILITY_VALIDATED = 16,\n        /**\n         * Indicates that the network is portal.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 12\n         */\n        NET_CAPABILITY_PORTAL = 17,\n        /**\n         * Indicates that the network is checking connectivity.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 12\n         */\n        NET_CAPABILITY_CHECKING_CONNECTIVITY = 31\n    }\n    /**\n     * Enumerates network types.\n     * @enum {number}\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Enumerates network types.\n     * @enum {number}\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Enumerates network types.\n     * @enum {number}\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    export enum NetBearType {\n        /**\n         * Indicates that the network is based on a cellular network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network is based on a cellular network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Indicates that the network is based on a cellular network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        BEARER_CELLULAR = 0,\n        /**\n         * Indicates that the network is based on a Wi-Fi network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network is based on a Wi-Fi network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Indicates that the network is based on a Wi-Fi network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        BEARER_WIFI = 1,\n        /**\n         * Indicates that the network is based on a bluetooth network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        BEARER_BLUETOOTH = 2,\n        /**\n         * Indicates that the network is an Ethernet network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Indicates that the network is an Ethernet network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        BEARER_ETHERNET = 3,\n        /**\n         * Indicates that the network is based on a VPN network.\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 12\n         */\n        BEARER_VPN = 4\n    }\n    /**\n     * Defines the network connection properties.\n     * @interface ConnectionProperties\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    export interface ConnectionProperties {\n        /**\n         * Network card name.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        interfaceName: string;\n        /**\n         * Domain. The default value is \"\".\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        domains: string;\n        /**\n         * Link information.\n         * @type {Array<LinkAddress>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        linkAddresses: Array<LinkAddress>;\n        /**\n         * Network address, refer to [NetAddress].\n         * @type {Array<NetAddress>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        dnses: Array<NetAddress>;\n        /**\n         * Routing information.\n         * @type {Array<RouteInfo>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        routes: Array<RouteInfo>;\n        /**\n         * Maximum transmission unit.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        mtu: number;\n    }\n    /**\n     * Defines network route information.\n     * @interface RouteInfo\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    export interface RouteInfo {\n        /**\n         * Network card name.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        interface: string;\n        /**\n         * Destination Address\n         * @type {LinkAddress}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        destination: LinkAddress;\n        /**\n         * Gateway address.\n         * @type {NetAddress}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        gateway: NetAddress;\n        /**\n         * Whether a gateway is present.\n         * @type {boolean}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        hasGateway: boolean;\n        /**\n         * Whether the route is the default route.\n         * @type {boolean}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        isDefaultRoute: boolean;\n    }\n    /**\n     * Defines network link information.\n     * @interface LinkAddress\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    export interface LinkAddress {\n        /**\n         * Link address.\n         * @type {NetAddress}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        address: NetAddress;\n        /**\n         * The length of the link address prefix.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        prefixLength: number;\n    }\n    /**\n     * Defines a network address.\n     * @interface NetAddress\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 8\n     */\n    /**\n     * Defines a network address.\n     * @interface NetAddress\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 12\n     */\n    export interface NetAddress {\n        /**\n         * Network address.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Network address.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 12\n         */\n        address: string;\n        /**\n         * Address family identifier. The value is 1 for IPv4 and 2 for IPv6. The default value is 1.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Address family identifier. The value is 1 for IPv4 and 2 for IPv6. The default value is 1.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 12\n         */\n        family?: number;\n        /**\n         * Port number. The value ranges from 0 to 65535.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 8\n         */\n        /**\n         * Port number. The value ranges from 0 to 65535.\n         * @type {?number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 12\n         */\n        port?: number;\n    }\n    /**\n     * Network Global Proxy Configuration Information.\n     * @interface HttpProxy\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @since 10\n     */\n    /**\n     * Network Global Proxy Configuration Information.\n     * @interface HttpProxy\n     * @syscap SystemCapability.Communication.NetManager.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface HttpProxy {\n        /**\n         * Proxy server host name.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 10\n         */\n        /**\n         * Proxy server host name.\n         * @type {string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        host: string;\n        /**\n         * Host port.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 10\n         */\n        /**\n         * Host port.\n         * @type {number}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        port: number;\n        /**\n         * Http proxy username.\n         * @type {?string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 12\n         */\n        username?: string;\n        /**\n         * Http proxy password.\n         * @type {?string}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 12\n         */\n        password?: string;\n        /**\n         * Do not use a blocking list for proxy servers.\n         * @type {Array<string>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @since 10\n         */\n        /**\n         * Do not use a blocking list for proxy servers.\n         * @type {Array<string>}\n         * @syscap SystemCapability.Communication.NetManager.Core\n         * @atomicservice\n         * @since 11\n         */\n        exclusionList: Array<string>;\n    }\n}\nexport default connection;\n",
}
export default FILE;